Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schemas in separate task to avoid freezes #854

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Conversation

domi4484
Copy link
Member

@domi4484 domi4484 commented Nov 30, 2023

Fix #848

@domi4484 domi4484 marked this pull request as draft November 30, 2023 09:05
@domi4484 domi4484 requested a review from signedav December 1, 2023 13:47
@domi4484 domi4484 marked this pull request as ready for review December 1, 2023 13:47
@signedav
Copy link
Member

signedav commented Dec 1, 2023

The problem persists that when there is a remote database with bad credentials / wrong port whatever, it freezes...

Make the test with db.sob.opengis.ch and you will see. Only if I first enter correct password / username, schema, db, port and then enter the url it works...

@domi4484
Copy link
Member Author

domi4484 commented Dec 4, 2023

The same super long freeze is present in older MB versions when entering db.sob.opengis.ch, wrong port, and pressing the Next button. In each case when executed in a thread it should not block... I'll try to find out where it locks

@signedav
Copy link
Member

signedav commented Dec 4, 2023

The same super long freeze is present in older MB versions when entering db.sob.opengis.ch, wrong port, and pressing the Next button. In each case when executed in a thread it should not block... I'll try to find out where it locks

Hm... Or when it takes that long maybe a shorter time out would be cool. Or don't we have it in our hands and it's a server thing?

@domi4484
Copy link
Member Author

domi4484 commented Dec 5, 2023

I did not see that here configuration.db_ili_version = db_utils.db_ili_version(configuration) a request is sent to the db, and thus outside the thread. This is the reason why the gui is still blocking.

Still I think the timeout is very long and likely to hang in other places... I can still try to find out the exact hang location (I suppose some psycopg function) and see if there is the possibility to pass a timeout argument. In that case what would be a good value for it?

@signedav
Copy link
Member

signedav commented Dec 5, 2023

Why it checks ili2db version? 🤔

@domi4484
Copy link
Member Author

domi4484 commented Dec 5, 2023

Its not necessary, I copy pasted too much code 😅

Copy link
Member

@signedav signedav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. That looks good.

@signedav signedav merged commit 0b554db into master Dec 6, 2023
6 checks passed
@signedav signedav deleted the updateSchemasTask branch December 6, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem on updating schema config
2 participants